<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>售后预约管理 - 766 SMART HOME</title>
<meta name="author" content="BIZ Team" />
<meta name="copyright" content="BIZ" />
<link href="${base}/resources/admin/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/resources/admin/js/jquery.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.tools.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/jquery.validate.js"></script>
<script type="text/javascript" src="${base}/resources/admin/editor/kindeditor.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/common.js"></script>
<script type="text/javascript" src="${base}/resources/admin/js/input.js"></script>
<script type="text/javascript" src="${base}/resources/admin/datePicker/WdatePicker.js"></script>
<style type="text/css">

</style>
</head>
<body>
	<div class="path">
		<a href="${base}/admin/common/index.jhtml">${message("admin.path.index")}</a> &raquo;系统发布
	</div>
	<form id="inputForm" action="addOrUpdate.jhtml" method="post">
		<ul id="tab" class="tab">
			<li>
				<input type="button" value="系统发布" />
			</li>
		</ul>
		<table class="input tabContent">
			<tr>
				<th>
					<span class="requiredField">*</span>系统发布时间:
				</th>
				<td>
					<input type="text" id="endDate" name="endDate" class="text Wdate" value="[#if releaseSystem.endDate!=null]${releaseSystem.endDate?string("yyyy-MM-dd HH:mm")}[/#if]" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',minDate:'%y-%M-%d-%H-%m'});">
				</td>
			</tr>
			<tr>
				<th>
					<span class="requiredField">*</span>温馨提示:
				</th>
				<td>
					<textarea id="content" name="content" type="text" style="width:300px;">${releaseSystem.content}</textarea>
					<input type="hidden" name="id" value="${releaseSystem.id}"/>
				</td>
			</tr>
			<tr>
				<th>
					<span class="requiredField"></span>是否可用:
				</th>
				<td>
					<input type="checkBox" id="state" [#if releaseSystem.state==1]checked="checked"[/#if]" name="state" value="1"></input>
				</td>
			</tr>
		</table>
		<table class="input">
			<tr>
				<th>
					&nbsp;
				</th>
				<td>
					<input type="submit" class="button" value="${message("admin.common.submit")}" />
				</td>
			</tr>
		</table>
	</form>
</body>
<script type="text/javascript">
$().ready(function() {

	[@flash_message /]
	var $inputForm = $("#inputForm");
	// 表单验证
	$inputForm.validate({
		rules: {
			content:{
				required: true
			},
			endDate:{
				required: true
			}
		},
		messages: {
			content: {
				required: "必填"
			},
			endDate:{
				required: "必填"
			}
		}
	});
	$(".button").click(function(){
		var content = $("#content").val();
		var endDate = $("#endDate").val();
		var state = $("#state").attr("checked");
		if(content.length!="" && endDate!=""){
			zi(content,state);
		}
	});
	function zi(content,state){
		parent.fu(content,state);
	}
});
</script>
</html>